package exercise_2;

import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Graphics;


public class exercise_2 extends JPanel 
{
    public void paintComponent(Graphics g)
    {
    	super.paintComponent(g);
    	int radius = 10;
        for (int i = 1; i <= 12; i++)
        {
              g.drawOval(130 - (radius + 10* i), 130 - (radius + 10 * i),
                      (radius + 10* (i-1)) * 2, (radius + 10*(i-1)) * 2);
        }//end for
    }//end method paintComponent
    
    public static void main(String[] args)  
    {  
    // create a panel that contains our drawing  
    exercise_2 panel = new exercise_2();  
   
    // create a new frame to hold the panel  
    JFrame application = new JFrame();  
   
    // set the frame to exit when it is closed  
   application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);  
  
    application.add(panel); // add the panel to the frame        
    application.setSize(280, 280); // set the size of the frame  
    application.setVisible(true); // make the frame visible   
    }//end method main
}//end class Shapes